﻿<e:DialogWindow x:Class="TLM.Wizard.WizardBase"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:e="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.11.0"
             xmlns:vml="clr-namespace:TLM.Wizard"
             xmlns:p="clr-namespace:TLM.Wizard.Pages"
             xmlns:vm="clr-namespace:TLM.Wizard.ViewModels"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             Title="Binding (localization) of hardcoded... (Test list migration tool)"
             Height="600" Width="600"
             ResizeMode="NoResize"
             ShowInTaskbar="False"
             WindowStartupLocation="CenterScreen"
             x:Name="WizardBaseDialog"
             mc:Ignorable="d">
    <e:DialogWindow.Resources>
        <vml:ViewModelLocator x:Key="Locator" d:IsDataSource="True" />

        <DataTemplate DataType="{x:Type vm:StartViewModel}">
            <p:StartPage />
        </DataTemplate>

        <DataTemplate DataType="{x:Type vm:ConversionChoiceViewModel}">
            <p:ConversionChoicePage />
        </DataTemplate>

        <DataTemplate DataType="{x:Type vm:ConversionProgessViewModel}">
            <p:ConversionProgessPage />
        </DataTemplate>
    </e:DialogWindow.Resources>

    <Grid Margin="10" DataContext="{Binding WizardBase, Source={StaticResource Locator}}">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="35" />
        </Grid.RowDefinitions>
        
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="0.5*" />
            <ColumnDefinition Width="0.5*" />
        </Grid.ColumnDefinitions>

        <ContentControl x:Name="ControlView" Grid.ColumnSpan="2" Grid.Row="0" Grid.Column="0"
            HorizontalAlignment="Stretch"
            VerticalAlignment="Stretch" Content="{Binding CurrentPage}" />

        <StackPanel Grid.Row="1" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Bottom" Orientation="Horizontal">
            <Button Margin="0,0,10,0" Padding="15,0,15,0" Content="{Binding Path=CancelButtonText}" Name="CancelButton" Command="{Binding Path=CancelCommand}" />
        </StackPanel>

        <StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal">
            <Button Margin="10,0,0,0" Padding="15,0,15,0" Content="{Binding Path=PreviousButtonText}" Name="PreviousButton" Command="{Binding Path=PreviousCommand}" />
            <Button Margin="10,0,0,0" Padding="15,0,15,0" Content="{Binding Path=NextButtonText}" Name="NextButton" Command="{Binding Path=NextCommand}" />
        </StackPanel>

    </Grid>
</e:DialogWindow>
